Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(esp_encrypted_img): Added pre_encrypted_ota example #398

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hrushikesh430
Copy link
Collaborator

Added the pre_encrypted_ota example in esp_encrypted_img component

Checklist

  • Component contains License
  • Component contains README.md
  • Component contains idf_component.yml file with url field defined

Description

Added the pre_encrypted_ota in esp_encrypted_img component.

@hrushikesh430 hrushikesh430 self-assigned this Oct 9, 2024
@hrushikesh430 hrushikesh430 marked this pull request as draft October 9, 2024 16:40
@hrushikesh430 hrushikesh430 requested a review from mahavirj October 9, 2024 16:41
@hrushikesh430
Copy link
Collaborator Author

cc @AdityaHPatwardhan

@hrushikesh430 hrushikesh430 force-pushed the feat/adding_pre_encrypted_example branch 5 times, most recently from 5b77a12 to c04fd5a Compare October 15, 2024 08:46
@igrr igrr linked an issue Oct 15, 2024 that may be closed by this pull request
@hrushikesh430 hrushikesh430 force-pushed the feat/adding_pre_encrypted_example branch 7 times, most recently from 5e5beda to 8d12bff Compare October 17, 2024 11:22
@hrushikesh430
Copy link
Collaborator Author

hrushikesh430 commented Oct 18, 2024

2024-10-17 11:59:28 I (427) main_task: Calling app_main()
2024-10-17 11:59:28 I (477) esp_eth.netif.netif_glue: 24:0a:c4:e7:fa:d7
2024-10-17 11:59:28 I (477) esp_eth.netif.netif_glue: ethernet attached to netif
2024-10-17 11:59:31 I (3177) ethernet_connect: Waiting for IP(s).
2024-10-17 11:59:39 I (11677) esp_netif_handlers: example_netif_eth ip: 192.168.156.27, mask: 255.255.255.0, gw: 192.168.156.1
2024-10-17 11:59:39 I (11677) ethernet_connect: Got IPv4 event: Interface "example_netif_eth" address: 192.168.156.27
2024-10-17 11:59:39 I (11677) example_common: Connected to example_netif_eth
2024-10-17 11:59:39 I (11687) example_common: - IPv4 address: 192.168.156.27,
2024-10-17 11:59:39 I (11687) pre_encrypted_ota_example: Starting Pre Encrypted OTA example
2024-10-17 11:59:39 I (11697) esp_encrypted_img: Starting Decryption Process
2024-10-17 11:59:39 I (11707) main_task: Returned from app_main()
2024-10-17 11:59:42 E (14767) esp-tls: [sock=54] select() timeout
2024-10-17 11:59:42 E (14767) esp-tls: Failed to open new connection
2024-10-17 11:59:42 E (14767) transport_base: Failed to open a new connection
2024-10-17 11:59:42 E (14767) HTTP_CLIENT: Connection failed, sock < 0
2024-10-17 11:59:42 E (14777) esp_https_ota: Failed to open HTTP connection: ESP_ERR_HTTP_CONNECT
2024-10-17 11:59:42 E (14777) esp_https_ota: Failed to establish HTTP connection
2024-10-17 11:59:42 E (14787) pre_encrypted_ota_example: ESP HTTPS OTA Begin failed
Connected to AP/Ethernet with IP: 192.168.156.27
writing to device: https://172.21.0.2:8001/pre_encrypted_ota_secure.bin
FAILED

@igrr any idea about how to fix this issue, actually server is starting on different network(172.21.0.2) and client is in different network (192.168.156.27), thus unable to connect to server.

cc @mahavirj

@hrushikesh430 hrushikesh430 force-pushed the feat/adding_pre_encrypted_example branch 9 times, most recently from adb5bd6 to c34f74e Compare November 11, 2024 11:45
@hrushikesh430 hrushikesh430 force-pushed the feat/adding_pre_encrypted_example branch 2 times, most recently from 273f896 to 47328af Compare November 21, 2024 14:53
@hrushikesh430 hrushikesh430 force-pushed the feat/adding_pre_encrypted_example branch 15 times, most recently from fa24539 to ece8898 Compare December 9, 2024 10:09
@hrushikesh430 hrushikesh430 force-pushed the feat/adding_pre_encrypted_example branch 2 times, most recently from d0b9160 to f272297 Compare December 10, 2024 05:48
@mahavirj
Copy link
Member

@igrr clang-tidy job seems to be failing on this PR:

Run . ${IDF_PATH}/export.sh
Could not detect IDF_PATH. Please navigate to your ESP-IDF directory and run:
. ./export.sh
Error: Process completed with exit code 1.

@fhrbata
Copy link
Collaborator

fhrbata commented Dec 12, 2024

@igrr clang-tidy job seems to be failing on this PR:

Run . ${IDF_PATH}/export.sh
Could not detect IDF_PATH. Please navigate to your ESP-IDF directory and run:
. ./export.sh
Error: Process completed with exit code 1.

Hello, I think adding shell: bash to the Install pyclang job should fix this.

diff --git a/.github/workflows/clang-tidy.yml b/.github/workflows/clang-tidy.yml
index dedb409f37be..1a3c177af5f0 100644
--- a/.github/workflows/clang-tidy.yml
+++ b/.github/workflows/clang-tidy.yml
@@ -24,6 +24,7 @@ jobs:
           curl -sSL https://github.com/psastras/sarif-rs/releases/download/clang-tidy-sarif-v0.3.3/clang-tidy-sarif-x86_64-unknown-linux-gnu -o clang-tidy-sarif
           chmod +x clang-tidy-sarif
       - name: Install pyclang
+        shell: bash
         run: |
           . ${IDF_PATH}/export.sh
           pip install pyclang~=0.2.0

EDIT: I created PR for this #456 Hopefully it should help.

@hfudev
Copy link
Member

hfudev commented Dec 12, 2024

maybe off-topic. pip install pyclang~=0.2.0 would only install 0.2.3, while the latest version is 0.6. Do you consider to update it to pip install pyclang~=0.2 which could install all versions <1?

@igrr
Copy link
Member

igrr commented Dec 12, 2024

Do you consider to update it to pip install pyclang~=0.2

I checked espressif/clang-tidy-runner@v0.2.3...v0.6.0 and don't see any fixes which would affect the CI job in this repo. We can update it there are some new features which will improve the workflow (e.g. espressif/clang-tidy-runner#9) or important fixes.

@hfudev
Copy link
Member

hfudev commented Dec 12, 2024

no i didn't mean that the upgrade would fix it... off-topic. just in case the version range used in the GH action is written unexpectedly.

@hrushikesh430 hrushikesh430 force-pushed the feat/adding_pre_encrypted_example branch 3 times, most recently from 66fec79 to 768c278 Compare December 13, 2024 06:40
1. Moved pre_encrypted_ota example from esp-idf to idf-extra-component.
2. Created server on app side
3. Flashed the pre_encrypted_ota_secure.bin in OTA1
4. Provided the URI and binary size from the pytest
@hrushikesh430 hrushikesh430 force-pushed the feat/adding_pre_encrypted_example branch from 768c278 to f162617 Compare December 13, 2024 08:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add example for esp_encrypted_img (IEC-200)
5 participants